package com.example.demo13zuulinvoker.controller;

import com.example.demo13zuulinvoker.service.InvokerService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Created by yawn on 2017-11-05 16:43
 */
@RestController
public class InvokerController {

    @Resource
    private InvokerService invokerService;

    @GetMapping(value = "/ca/{id}")
    public String getCar(@PathVariable int id) {
        return invokerService.getCar(id);
    }
}
